package com.movie.service;

import com.movie.entity.Movie;
import com.movie.mapper.MovieMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 黄军艳
 * @version 1.0
 * @date 2024/12/9  11:41
 */
@Service("movieService")
public class MovieServiceImpl implements MovieService {
    @Autowired
    private MovieMapper movieMapper;
    @Override
    public int insert(Movie movie) {
        return movieMapper.insert(movie);
    }

    @Override
    public int update(Movie movie) {
        return movieMapper.update(movie);
    }

    @Override
    public int delete(int id) {
        return movieMapper.delete(id);
    }

    @Override
    public Movie detail(int id) {
        return movieMapper.detail(id);
    }

    @Override
    public int count(String movieName) {
        return movieMapper.count(movieName);
    }

    @Override
    public List<Movie> selectPageList(int pageBegin, int pageSize, String movieName) {
        return movieMapper.selectPageList(pageBegin, pageSize, movieName);
    }
}
